package com.dearbinge.data.service.impl.content;

import com.dearbinge.data.api.content.SendContentService;
import com.dearbinge.data.dao.SendContentMapper;
import com.dearbinge.data.pojo.content.SendContent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service(value = "sendContentService")
public class SendContentServiceImpl implements SendContentService {

    @Autowired
    private SendContentMapper sendContentMapper;

    @Override
    public List<SendContent> getAll() {
        List<SendContent> all = sendContentMapper.getAll();
        return all;
    }

    @Override
    public Integer getCount() {
        Integer count = sendContentMapper.getCount();
        return count;
    }

    @Override
    public SendContent getById(Integer id) {
        SendContent sendContent = sendContentMapper.getById(id);
        return sendContent;
    }

    @Override
    public Integer update(SendContent sendContent) {
        Integer dataCode = sendContentMapper.updateByPrimaryKey(sendContent);
        return dataCode;
    }

    @Override
    public Integer insert(SendContent sendContent) {
        Integer dataCode = sendContentMapper.insert(sendContent);
        return dataCode;
    }

}
